package com.gzucm.Scholarship.entity;

import com.gzucm.Scholarship.common.base.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;

@Data
@Entity
@ApiModel
@NoArgsConstructor
@Table(name = "bonus_item")
public class BonusItem extends BaseEntity {

    @NotBlank(message = "项目名称不能为空")
    @ApiModelProperty(value = "项目名称")
    @Column(name = "name", nullable = false)
    private String name;

    @NotBlank(message = "获奖级别不能为空")
    @ApiModelProperty(value = "获奖级别")
    @Column(name = "level", nullable = false)
    private String level;

    @ApiModelProperty(value = "申请人id")
    @Column(name = "applicant", nullable = false)
    private String applicant;

    @NotBlank(message = "学年不能为空")
    @ApiModelProperty(value = "学年")
    @Column(name = "year", nullable = false)
    private String year;

    @NotNull(message = "类型不能为null")
    @ApiModelProperty(value = "类型", allowableValues = "1,2,3")
    @Column(name = "type", nullable = false)
    private Integer type;

    @ApiModelProperty(value = "状态")
    @Column(name = "state", nullable = false)
    private Integer state;

    @ApiModelProperty(value = "分数")
    @Column(name = "score", nullable = true)
    private BigDecimal score;

    @ApiModelProperty(value = "是否职位加分")
    @Column(name = "job", nullable = true)
    private Boolean job;

    @ApiModelProperty(value = "证明材料文件")
    @Column(name = "file", nullable = true)
    private String file;

}
